package org.lc.service.system.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.lc.platform.mybatis.entity.BaseEntity;
import org.lc.platform.mybatis.manager.annotation.OrderBy;
import org.lc.platform.mybatis.manager.annotation.Params;

import java.io.Serial;
import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(autoResultMap = true)
@OrderBy(params = {
        @Params(field = "sort", isAsc = true)
})
public class SysDictDetail extends BaseEntity implements Serializable {

    public SysDictDetail() {
    }

    public SysDictDetail(String dictId, String label, Object value, Integer sort) {
        this.label = label;
        this.value = value;
        this.sort = sort;
        this.dictId = dictId;
    }

    /**
     * 展示标签
     */
    @Schema(description = "展示标签")
    private String label;

    /**
     * 展示值（默认都是string）
     */
    @Schema(description = "展示值（默认都是string）")
    private Object value;

    /**
     * 值得类型
     * ['string', 'boolean', 'int', 'float', 'json', 'empty']
     */
    @Schema(description = "值得类型")
    private String type;

    /**
     * 是否隐藏该项
     */
    @Schema(description = "是否隐藏该项")
    private Boolean hide;

    /**
     * 是否禁用
     */
    @Schema(description = "是否禁用")
    private Boolean disabled;

    /**
     * 序号
     */
    private Integer sort;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 字典ID
     */
    @Schema(description = "字典ID")
    private String dictId;

    @Serial
    private static final long serialVersionUID = 1L;
}
